﻿using System;
using System.Collections.Generic;

namespace WeWork.SDK.Framework.Entitys
{
    /// <summary>
    /// 获取会话内容存档内部群信息
    /// </summary>
    public class RoomInfo
    {
        /*
        errcode	返回码
        errmsg	对返回码的文本描述内容
        roomname	roomid对应的群名称
        creator	roomid对应的群创建者，userid
        room_create_time	roomid对应的群创建时间
        notice	roomid对应的群公告
        members	roomid对应的群成员列表
        memberid	roomid群成员的id，userid
        jointime	roomid群成员的入群时间 

        {
            "roomname": "蓦然回首",
            "creator": "ZhangWenChao",
            "room_create_time": 1592361604,
            "notice": "",
            "members": [
                {
                    "memberid": "ZhangWenChao",
                    "jointime": 1592361605
                },
                {
                    "memberid": "xujinsheng",
                    "jointime": 1592377076
                }
            ],
            "errcode": 0,
            "errmsg": "ok"
        } 
        */
        /// <summary>
        /// roomid
        /// </summary>
        public string roomid { set; get; } = string.Empty;
        /// <summary>
        /// 群名称
        /// </summary>
        public string roomname { set; get; } = string.Empty;
        /// <summary>
        /// 群创建者，userid
        /// </summary>
        public string creator { set; get; } = string.Empty;
        /// <summary>
        /// 群创建时间（建议将long转成UTC时间）
        /// </summary>
        public DateTime room_create_time { set; get; }
        /// <summary>
        /// 群公告
        /// </summary>
        public string notice { set; get; } = string.Empty;
        /// <summary>
        /// 群成员列表
        /// </summary>
        public List<RoomMember> members { set; get; } = new List<RoomMember>();
    }
    /// <summary>
    /// 群成员信息
    /// </summary>
    public class RoomMember
    {
        /// <summary>
        /// 群成员的id，userid
        /// </summary>
        public string memberid { set; get; } = string.Empty;
        /// <summary>
        /// 群创建时间（建议将long转成UTC时间）
        /// </summary>
        public DateTime jointime { set; get; }
    }
}
